<%@ page contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ include file="/WEB-INF/jsp/includes/common.jsp"%>
<html>
<head>
<%@ include file="/WEB-INF/jsp/includes/head.jsp"%>
<script type="text/javascript" src="${ctx }/js/lib/jquery.validate.js"></script>
<script type="text/javascript"
	src="${ctx }/js/lib/jquery.validate.messages_cn.js"></script>
<script type="text/javascript" src="${ctx }/js/base/validateinfo.js"></script>
<script type="text/javascript"
	src="${ctx }/js/datashow/datastatistics.js"></script>
</head>
<body>
	<%@ include file="/WEB-INF/jsp/includes/logo.jsp"%>
	<div class="container">
		<div class="main clearfix">
			<%@ include file="/WEB-INF/jsp/includes/nav.jsp"%>
			<div class="container2 fl">
				<div class="main">
					<h4 class="mb10">数据统计</h4>
					<div class="content-wraper">
						<form id='search_form' action="${ctx }/statistics/index.do">
							<p class="validate-tips">${error }</p>
							<section>
								<div class="hd clearfix">
									<%-- 隐藏文本域，用于区分查询类型 --%>
									<input type='hidden' name='s_type' id='s_type'></input>
									<input type='hidden' name='s_id' id='s_id'></input>
									<div class="item clearfix">
										<div class="item-left">
											<label>活动名称：</label>
											<c:if test="${s_active_name==null }">
												<input id="s_active_name" name="s_active_name" type="text"
													placeholder="请输入活动名称" />
											</c:if>
											<c:if test="${s_active_name!=null }">
												<input id="s_active_name" name="s_active_name" type="text"
													value="${s_active_name }" placeholder="请输入活动名称" />
											</c:if>
											<!-- 										<input id="s_active_name" name="s_active_name" type="text" placeholder="请输入活动名称" /> -->
										</div>
										<div class="item-right">
											<label>活动状态：</label> <select id="s_active_state"
												name="s_active_state" class="active-status mr10">
												<nad:option name="s_active_state"
													list="#{0:所有,1:尚未进行,2:正在进行,3:已经结束,4:活动关闭}" />
											</select>
										</div>
									</div>
									<div class="item datetime">
										<input id='btn_search' type="button" class="btn-search btn btn2 fr mt5 mr10" value="搜索" />
										<label>时间范围：</label> <input type="text" name="s_date_start"
											class="datepicker"
											value="${s_date_start}" readonly="readonly"/>
										<!-- 										<input type="text" class="timepicker" placeholder="请选择开始时间" />  -->
										<span>&nbsp;至</span> <input type="text" name="s_date_end"
											class="datepicker" value="${s_date_end}" readonly="readonly"/>
										<!-- 									<input type="text" class="timepicker" placeholder="请选择结束时间" /> -->
									</div>
								</div>
							</section>
						</form>
					</div>
					<div class="cont mt10">
						<table cellspacing="0" border="1" width="100%">
							<thead>
								<tr>
									<th width="50">序号</th>
									<th width="140">活动</th>
									<th width="120">活动状态</th>
									<th width="120">活动参与ID数</th>
									<th width="120">活动抽奖人次</th>
									<th width="120">活动G币回收</th>
									<th>活动G币支出</th>
								</tr>
							</thead>
							<c:if test="${page.total>0 }">
								<tbody>
									<nad:table dataList="${total }">
										<nad:row>
											<%-- 奇偶行 --%>
											<c:if test="${DATALIST_CURRENTROW%2==1 }">
												<tr class="odd">
											</c:if>
											<c:if test="${DATALIST_CURRENTROW%2==0 }">
												<tr class="even">
											</c:if>
											<td></td>
											<td><a class='total' href="javascript:void(0);">合计</a></td>
											<td>无</td>
											<td><nad:col name="joinTotalNum" format="###,###,###" /></td>
											<td><nad:col name="takeTotalNum" format="###,###,###" /></td>
											<td><nad:col name="gTotalIn" format="###,###,###" /></td>
											<td><nad:col name="gTotalOut" format="###,###,###" /></td>
										</nad:row>
									</nad:table>
									<nad:table dataList="${page.dataList }" trans="${trans }">
										<nad:row>
											<%-- 奇偶行 --%>
											<c:if test="${DATALIST_CURRENTROW%2==0 }">
												<tr class="odd">
											</c:if>
											<c:if test="${DATALIST_CURRENTROW%2==1 }">
												<tr class="even">
											</c:if>
											<%-- 数据 --%>
											<td>${DATALIST_CURRENTROW+1 }</td>
											<td><a id='<nad:col name="activeId" />' class='detail'
												href='javascript:void(0);'><nad:col name="activeName" /></a>
											</td>
											<td><nad:col name="faceStatus"/></td>
											<td><nad:col name="joinNum" format="###,###,###" /></td>
											<td><nad:col name="takeNum" format="###,###,###" /></td>
											<td><nad:col name="gIn" format="###,###,###" /></td>
											<td><nad:col name="gOut" format="###,###,###" /></td>
										</nad:row>
									</nad:table>
								</tbody>
							</c:if>
							<c:if test="${page.total<=0 }">
								<tbody>
									<tr class="no-results">
										<td colspan="100%">未查询到结果！</td>
									</tr>
								</tbody>
							</c:if>
						</table>
					</div>
					<div class="ft mt10 clearfix pageno">
						<c:if test="${page.total>0 }">
							<nad:pagebar page="${page }" action="${ctx }/statistics/index.do" />
						</c:if>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>


